package com.zhaodadiao.app;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DateTest {
//    public static void main(String[] args) throws SQLException {
//        try {
//            Class.forName("com.mysql.cj.jdbc.Driver");

//            Connection connection= DriverManager.getConnection("jdbc:mysql://localhost:3306/stu?serverTimezone=UTC",
//                    "root","200811a");
//            System.out.println(connection.isClosed() ? "连接失败":"连接成功");
//        } catch (ClassNotFoundException e) {
//            e.printStackTrace();
//        }
//
//    }
public static void main(String[] args) throws SQLException {
    try {
        Class.forName("com.mysql.cj.jdbc.Driver");
        Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/stu?serverTimezone=UTC",
                "root","200811a");
    } catch (ClassNotFoundException e) {
        e.printStackTrace();
    }
}
}
